package com.av.bcacc.jetpack.databinding;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.av.bcacc.jetpack.R;
import com.av.bcacc.jetpack.modle.databinding.LoginUser;
/**
 * @description 常规模式编写代码
 * @author weiliang hu
 * @time 2021/5/12 21:16
 * @email:2072025612@qq.com
 */
public class NormalActivity extends AppCompatActivity {
    private EditText moibleEt;
    private EditText passwdEt;
    private Button loginBtn;
    private TextView resultTv;
    private LoginUser loginUser;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_normal);
        passwdEt = findViewById(R.id.editText);
        moibleEt = findViewById(R.id.editText2);
        loginBtn = findViewById(R.id.button4);
        resultTv = findViewById(R.id.textView7);
        loginBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String mobile = moibleEt.getText().toString();
                String passwd = passwdEt.getText().toString();
                loginUser=new LoginUser();
                loginUser.setPhone(mobile);
                loginUser.setPasswd(passwd);
                resultTv.setText("手机号："+loginUser.getPhone()+"  密码："+loginUser.getPasswd());
            }
        });
    }
}
